const Main = () => import("VIEW/pages/main/main.vue");

const router = [
  {
    path: "/",
    redirect: "/login"
  },
  {
    path: "/login",
    name: "login",
    component: () => import("VIEW/pages/login/index.vue")
  },
  {
    path: "/",
    component: () => import("VIEW/pages/main/main.vue"),
    children: [
      {
        path: "/home",
        name: "main",
        component: () => import("VIEW/pages/project/project-list.vue")
      },
      {
        path: "/data",
        name: "data",
        component: () => import("VIEW/pages/data/index.vue"),
        props: route => {
          return {
            project_id: route.query.project_id
          };
        }
      },
      {
        path: "/manage",
        name: "manage",
        component: () => import("VIEW/pages/manage/index.vue"),
        props: route => {
          return {
            project_id: route.query.project_id
          };
        }
      },
      {
        path: "/setting",
        name: "setting",
        component: () => import("VIEW/pages/setting/index.vue"),
        props: route => {
          return {
            project_id: route.query.project_id
          };
        }
      }
    ]
  }
];
export default router;
